package bit.book.entity;

import lombok.Data;
import lombok.NoArgsConstructor;


@Data
public class PageRequest {
    private Integer currentPage=1;
    private Integer size=10;
    private int offset;

    public Integer getOffset() {
        return (currentPage-1)*size;
    }

//    public PageRequest(Integer currentPage,Integer size){
//        this.currentPage=currentPage;
//        this.size=size;
//        this.offset= (currentPage - 1) * size;
//    }

//    public PageRequest(){
//
//        this.offset = (this.currentPage - 1) * this.size;
//    }

}
